package com.dlc.shop.systemtest.api.amount;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import com.dlc.shop.bean.app.dto.ShopCartOrderMergerDto;
import com.dlc.shop.bean.app.param.PayParam;
import com.dlc.shop.common.util.Json;
import com.dlc.shop.groupbuy.common.api.param.GroupOrderParam;
import com.dlc.shop.systemtest.constants.Constant;
import com.dlc.shop.systemtest.util.CheckUtil;
import com.dlc.shop.systemtest.util.HttpUtil;

/**
 * @author lanhai
 */
public class PayApi {
    public static void pay(PayParam payParam){
        String uri = Constant.API_URL+"/p/order/pay";
       HttpUtil.post(uri,payParam,Object.class,true);
    }

    /**
     * 用户参团支付
     */
    public static void otherPay(PayParam payParam){
        String uri = Constant.API_URL+"/p/order/pay";
        HttpRequest post = HttpRequest.post(uri);
        post.header("authorization", Constant.OTHER_API_TOKEN);
        post.header("Content-type", "application/json; charset=UTF-8");
        HttpResponse response = post.body(Json.toJsonString(payParam)).execute();
    }
}
